<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:c="http://java.sun.com/jstl/core"
                xmlns:sf="http://www.springframework.org/tags/faces"
                xmlns:a4j="http://richfaces.org/a4j"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:spring="http://www.springframework.org/tags">

    <!-- <script type="text/javascript" src="/scripts/tooltip.js"></script> -->

    <ui:fragment id="schedulerEducationFragment">
        <rich:calendar id="schedulerEducationCalendar"
                       locale="#{calendarBean.locale}"
                       value="#{calendarBean.selectedDate}"
                       popup="false"
                       showInput="true"
                       showApplyButton="true"
                       cellWidth="100px"
                       cellHeight="80px"
                       showFooter="true"
                       dataModel="#{calendarDataModelEducationImpl}">
            <a4j:support event="oncurrentdateselected" reRender="schedulerEducationCalendar"/>

            <a4j:outputPanel layout="block" id="cell"
                             style="height: 100%;">
                <!-- onclick="#{rich:component('panel')}.show()" -->

                <div>
                    <h:outputText value="{day}" style="align:center"/>
                </div>
                <div>&#xA0;</div>
                <div style="background-color:#ff6347">
                    <h:outputText value="{data.1}" style="color:white;"/>
                </div>
                <div style="background-color:#6495ed;">
                    <h:outputText value="{data.2}" style="color:white;"/>
                </div>
                <div style="background-color:#ff6347">
                    <h:outputText value="{data.3}" style="color:white;"/>
                </div>
                <div style="background-color:#6495ed;">
                    <h:outputText value="{data.4}" style="color:white;"/>
                </div>
            </a4j:outputPanel>
        </rich:calendar>

        <rich:modalPanel id="panel" resizeable="false">
            <f:facet name="header">Les cours du jour</f:facet>
            <h:form>
                <h:panelGrid columns="2" id="editContent">
                    <h:outputText value="Today"/>
                    <h:outputText value="{data.1}"/>
                </h:panelGrid>
                <h:commandButton type="button" id="backButton" onclick="#{rich:component('panel')}.hide()"
                                 value="{bundle.exitButton}"/>
            </h:form>
        </rich:modalPanel>
    </ui:fragment>
</ui:composition>